home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
49217
/
49217.xpi
/
chrome
/
content
/
doclistscript.js
< prev
next >
Wrap
Text File
|
2009-11-12
|
2KB
|
47 lines
if (window.urlViewIdString != null && (window.urlViewIdString.indexOf('http') == 0 || window.urlViewIdString.indexOf('www') == 0))
{
//Disable Background
var page = document.getElementsByTagName('body')[0];
var bgdiv = document.createElement('div');
bgdiv.setAttribute("id","layer");
bgdiv.setAttribute("class","layer");
bgdiv.innerHTML = '';
bgdiv.style.height = window.innerHeight+'px';
bgdiv.style.width = window.innerWidth+'px';
page.appendChild(bgdiv);
// Add a DIV while processing
var s1 = document.getElementById('doclist');
var sc1 = document.createElement('div');
sc1.setAttribute("id","eatTime");
sc1.innerHTML = '<DIV class="loadingDiv" id="outerDiv22" style="display: block;"> <DIV class="head2" id="head"> <SPAN>Wait while we Import your document... <img src="chrome://importtogoogledocs/skin/ajax-loader.gif"/></SPAN></DIV></DIV>';
s1.appendChild(sc1);
var url = "http://docs.google.com/DocAction?action=updoc&classic=true";
var xmlhttp;
xmlhttp=new XMLHttpRequest();
xmlhttp.onreadystatechange=function() {
if(xmlhttp.readyState==4) {
var result = xmlhttp.responseText;
addHiddenDiv(result);
}
};
xmlhttp.open("GET",url,true);
xmlhttp.send(t);
}
function addHiddenDiv(body) {
var doclist = document.getElementById('doclist');
var div = document.createElement('div');
div.setAttribute('id', 'temp');
div.style.display = 'none';
div.innerHTML = body;
doclist.appendChild(div);
var token = document.getElementsByName('security_token')[0].value;
var uploadURL = document.getElementById('uploadURL');
var uploadThis = window.urlViewIdString;
uploadURL.value = uploadThis;
var form = document.forms[1];
form.submit();
}